package cn.slipi.consumer.controller;

import cn.slipi.consumer.facade.ProviderCallFacade;
import cn.slipi.service.entity.TStd;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign")
public class FeignController {

    @Autowired
    private ProviderCallFacade providerCallFacade;

    @RequestMapping("/test")
    public String testFeign() {
        return providerCallFacade.test1();
    }

    @RequestMapping("/test1")
    public Object test1Feign() {
        TStd tStd = new TStd();
        tStd.setStatus(1);
        tStd.setId(1000);
        tStd.setCreatedAt(12312324234L);
        return providerCallFacade.test2(tStd);
    }

}
